<?xml version="1.0"?>
<configuration>
  <SmtpServer Host="localhost" />
  <!-- Global instructions (always executed without regard of hook type) -->
  <Instructions>
  </Instructions>

  <!-- Pre-Commit instructions -->
  <Instructions>
    <HookTypeCondition HookType="PreCommit" />
	
	<!-- Enforce log messages with at least 10 characters -->
    <FailInstruction Message="Mind. 10 Zeichen erforderlich.">
      <LogMessageCondition LogMessageRegExPattern=".{10}" Negate="True" />
    </FailInstruction>
	
	<!-- Allow checkin of bmp and png files only with special tag [Add resource file] in commit log -->
    <FailInstruction Message="Ressourcen (*.bmp, *.png) duerfen nur mit speziellem Tag hinzugefuegt werden">
      <Conditions Type="And">
        <LogMessageCondition LogMessageRegExPattern="\[Add Resx File\]" Negate="True" />
        <ChangedPathCondition ChangedPathRegExPattern=".*\.(png|bmp)" />
      </Conditions>
    </FailInstruction>

	<!-- Locked repo paths -->
    <FailInstruction Message="The path /branches/version_1.1 is locked and may no longer be modified.">
      <ChangedPathCondition ChangedPathRegExPattern=".*/branches/version_1\.1.*" />
    </FailInstruction>
  </Instructions>

  <!-- Post-Commit instructions -->
  <Instructions>
    <HookTypeCondition HookType="PostCommit" />
	
	<!-- Send email reminder to user who modified "ImportantFile.txt" with further instructions -->
	<MailInstruction FromMailAddress="svn@silverseed.de" ToMailAddresses="#user#@silverseed.de" Subject="Wichtige Datei geaendert" Body="#logmessage#">
      <ChangedPathCondition ChangedPathRegExPattern=".*/trunk/ImportantFile.txt" />	  
	</MailInstruction>

	<!-- Notify project leader about every change -->
	<MailInstruction FromMailAddress="#user#@silverseed.de" ToMailAddresses="projectleader@silverseed.de" Subject="Svn ##revision#" Body="#logmessage#"/>

	<!-- Perfom StyleCop check on checked-in files -->
	<CommandLineInstruction FileName="" Arguments="">
      <ChangedPathCondition ChangedPathRegExPattern=".*\.cs" />
	</CommandLineInstruction >	
  </Instructions>
</configuration>
